////////////////////////////////////////////////////////////////////////////
//
//  Crytek Engine Source File.
//  Copyright (C), Crytek Studios, 2005.
// -------------------------------------------------------------------------
//  File name:   CloudObject.h
//  Version:     v1.00
//  Created:     05/02/2005 by Sergiy Shaykin.
//  Compilers:   Visual Studio.NET
//  Description: 
// -------------------------------------------------------------------------
//  History:
//
////////////////////////////////////////////////////////////////////////////

#ifndef __CloudObject_h__
#define __CloudObject_h__

#if _MSC_VER > 1000
#pragma once
#endif

#include "BaseObject.h"


class CCloudObject : public CBaseObject
{
public:
	DECLARE_DYNCREATE(CCloudObject)

	//////////////////////////////////////////////////////////////////////////
	// Ovverides from CBaseObject.
	//////////////////////////////////////////////////////////////////////////
	void Display( DisplayContext &dc );
	void GetLocalBounds( AABB &box );
	bool HitTest( HitContext &hc );

	//! Called when object is being created.
	int MouseCreateCallback( CViewport *view,EMouseEvent event,CPoint &point,int flags );

	//////////////////////////////////////////////////////////////////////////
	// Cloud parameters.
	//////////////////////////////////////////////////////////////////////////
	CVariable<int> mv_spriteRow;
	CVariable<float> m_width;
	CVariable<float> m_height;
	CVariable<float> m_length;
	CVariable<float> m_angleVariations;
	CVariable<float> mv_sizeSprites;
	CVariable<float> mv_randomSizeValue;

protected:
	CCloudObject();

	void DeleteThis() { delete this; };
	void OnSizeChange(IVariable *pVar);

	bool m_bNotSharedGeom;
	bool m_bIgnoreNodeUpdate;
};

/*!
 * Class Description of CCloudObject.	
 */
class CCloudObjectClassDesc : public CObjectClassDesc
{
public:
	REFGUID ClassID()
	{
		// {ea981e84-16e5-4e78-8058-ece7dc66b1b7}
		static const GUID guid = { 0xea981e84, 0x16e5, 0x4e78, { 0x80, 0x58, 0xec, 0xe7, 0xdc, 0x66, 0xb1, 0xb7 } };
		return guid;
	}
	ObjectType GetObjectType() { return OBJTYPE_CLOUD; };
	const char* ClassName() { return "CloudVolume"; };
	const char* Category() { return "Misc"; };
	CRuntimeClass* GetRuntimeClass() { return RUNTIME_CLASS(CCloudObject); };
	const char* GetFileSpec() { return ""; };
	int GameCreationOrder() { return 150; };
};

#endif // __CloudObject_h__